const {http} = require("./http")
function movieSearch(keyword){
    return http({
        url:`api/search?keyword=${keyword}`,
    })
}
//  movieCollect    /api/collectMovie/:m
const baseurl = "http://120.25.251.98:8084/"
function getMovieCollect({
    url,id,collected
}){
    wx.request({
        url: baseurl+url,
        data: {id,collected},
        header: {'content-type':'application/x-www-form-urlencoded'},
        method: 'POST',
        dataType: 'json',
        responseType: 'text',
    });
}
module.exports = {movieSearch,getMovieCollect}